<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <title>充值列表</title>

	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
		<link rel="stylesheet" type="text/css" href="../ext/ext-all.css" />
		<script type="text/javascript" src="../ext/ext-base.js"></script>
		<script type="text/javascript" src="../ext/ext-all.js"></script>

	<style type="text/css">
	.ext-ie .x-menu-item-icon {left: -24px; top: 0px;}
	.ext-strict .x-menu-item-icon {left: 3px; top: 3px;}
	.ext-ie6 .x-menu-item-icon {left: -24px; top: 0px;}
	</style>
<script type="text/javascript">
Ext.BLANK_IMAGE_URL = '../images/s.gif';
</script>

	<script type="text/javascript">
	Ext.onReady(function(){

	var ChargeRecord = Ext.data.Record.create([
        {name: 'cid', type: 'string'},
        {name: 'cuname', type: 'string'},
        {name: 'cprice', type: 'string'},
        {name: 'csmsnum', type: 'string'},
        {name: 'ctime', type: 'string'},
        {name: 'coperator', type: 'string'},
        {name: 'cnote', type: 'string'}


    ]);

    var store = new Ext.data.Store({
        proxy: new Ext.data.HttpProxy({url: '../ajaxjsp/chargelist.jsp'}),
        reader: new Ext.data.JsonReader({
        totalProperty: 'totalCount',
        root: 'result'
        },ChargeRecord),
        remoteSort: true
    });


    var columns = new Ext.grid.ColumnModel([
        //{header: '编号', dataIndex: 'aid',width:1},
        new Ext.grid.RowNumberer(),
        {header: '被充值者', dataIndex: 'cuname'},
        {header: '充值', dataIndex: 'csmsnum'},
        {header: '充值时间', dataIndex: 'ctime'},
        {header: '操作员', dataIndex: 'coperator'}
        //{header: '通道密码', dataIndex: 'hpwd'}
    ]);

       columns.defaultSortable = true;

        var grid = new Ext.grid.GridPanel({
        title: '通道列表',
        region: 'center',
        loadMask: true,
        store: store,
        cm: columns,
        sm: new Ext.grid.RowSelectionModel({singleSelect:true}),
        viewConfig: {
        columnsText:'显示的列',
        sortAscText:'升序',
        sortDescText:'降序',
        forceFit: true
        },
        bbar: new Ext.PagingToolbar({
            pageSize: 15,
            store: store,
            displayInfo: true,
            displayMsg: '显示 {0} 条到 {1} 条记录，一共 {2} 条',
            emptyMsg:'没有记录'

        })
    });

    store.load({params:{start:0,limit:15}});



	var viewport = new Ext.Viewport({
	renderTo:'mt',
	layout:'border',
	items:[
	grid,
	{region:'south',contentEl:'inp',heigth:40}
	//{region:'east',html:'east',width:'30%'}
	]
	});

});
	</script>
  </head>

  <body>
   <div id="mt"></div>
   <div id="north1"></div>
   <div id="south"></div>
    <div id="wait" align="center"></div>
   <input id="inp" value="刷新页面" type="button" onclick="javascript:window.location.reload();"></input>
  </body>
</html>
